#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int n, b[1000];
	double sum = 0, a[1000];
	scanf("%d", &n);

	for (int i = 0; i < n; i++)
		scanf("%lf", &a[i]);

	for (int i = 0; i < n; i++)
		scanf("%d", &b[i]);

	for (int i = 0; i < n; i++)
		sum += a[i] * b[i];

	printf("%.2lf", sum);
	return 0;
}